﻿<Window x:Class="CmdletHelpViewer.Views.WindowParameterDetailView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Parameter Details"   
        WindowStartupLocation="CenterScreen" MaxHeight="475" MaxWidth="500" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight" ResizeMode="NoResize" >
    <Window.InputBindings>
        <KeyBinding Modifiers="Alt" Key="P" Command="{Binding PreviousCommand}"></KeyBinding>
        <KeyBinding Modifiers="Alt" Key="N" Command="{Binding NextCommand}"></KeyBinding>
    </Window.InputBindings>
    <Grid Background="#FFE3E9F2">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>
        <Grid Margin="5" Height="Auto" Width="Auto" DataContext="{Binding}" >
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="30"  />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30"/>
                <RowDefinition Height="30" />
                <RowDefinition Height="25"/>
                <RowDefinition Height="150" />
                <RowDefinition Height="50" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150" />
                <ColumnDefinition Width="*"/>
               </Grid.ColumnDefinitions>
            <Label Content="Name:" FontWeight="Bold" Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"/>
            <Label Content="Required:" FontWeight="Bold" Height="Auto" Width="Auto" HorizontalAlignment="Left"   VerticalAlignment="Center" Grid.Row="1" Grid.Column="0"/>
            <Label Content="Input Pipeline:" FontWeight="Bold" Height="Auto"  Width="Auto" HorizontalAlignment="Left"  VerticalAlignment="Center" Grid.Row="2" Grid.Column="0"/>
            <Label Content="Position:" FontWeight="Bold" Height="Auto"  Width="Auto" HorizontalAlignment="Left"   VerticalAlignment="Center" Grid.Row="3" />
            <Label Content="Variable Length:" FontWeight="Bold" Height="Auto" Width="Auto" HorizontalAlignment="Left"  VerticalAlignment="Center" Grid.Row="4"/>
            <Label Content="Globbing:" FontWeight="Bold" Height="Auto" Width="Auto" HorizontalAlignment="Left"  VerticalAlignment="Center" Grid.Row="5"/>
            <Label Content="Parameter Type:" FontWeight="Bold" Height="Auto" Width="Auto" HorizontalAlignment="Left"  VerticalAlignment="Center" Grid.Row="6"/>
            <Label Content="Description:" FontWeight="Bold" Height="Auto" Width="Auto" HorizontalAlignment="Left"  VerticalAlignment="Bottom" Grid.Row="7"/>
            <TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Height="Auto" Width="Auto"   Text="{Binding Path=CmdletParameter.Name, UpdateSourceTrigger=PropertyChanged}"  TextWrapping="Wrap"/>
            <TextBlock Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Height="Auto" Width="Auto"  Text="{Binding Path=CmdletParameter.Required}"  TextWrapping="Wrap"/>
            <TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Height="Auto" Width="Auto" Text="{Binding Path=CmdletParameter.PipeLineInput}"  TextWrapping="Wrap"/>
            <TextBlock Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Height="Auto" Width="Auto"  Text="{Binding Path=CmdletParameter.Position}"  TextWrapping="Wrap"/>
            <TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Height="Auto" Width="Auto"  Text="{Binding Path=CmdletParameter.VariableLength}"  TextWrapping="Wrap"/>
            <TextBlock Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Height="Auto" Width="Auto" Text="{Binding Path=CmdletParameter.Globbing}"  TextWrapping="Wrap"/>
            <TextBlock Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Height="Auto" Width="Auto"  Text="{Binding Path=CmdletParameter.ParameterType}"  TextWrapping="Wrap"/>
            <TextBox Grid.Row="8"  IsReadOnly="True" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.ColumnSpan="2" Height="150" Width="480"  Text="{Binding Path=CmdletParameter.Description}"  TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"/>
        </Grid>
        <Border Grid.Row="1" Grid.ColumnSpan="2" Background="{StaticResource ThickBottomBar1}" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="110"/>
                    <ColumnDefinition Width="110"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Button VerticalAlignment="Center" HorizontalAlignment="Left"  Height="25" Width="100"   Background="AliceBlue"  Content="Previous" ToolTip="Previous Parameter (ALT+P)" Command="{Binding PreviousCommand}" Margin="5"/>
                <Button Grid.Column="1" HorizontalAlignment="Left"  Height="25" Width="100"   Background="AliceBlue"  Content="Next" ToolTip="Next Parameter (ALT+N)" Command="{Binding NextCommand}" Margin="5"/>
                <Button Grid.Column="2" HorizontalAlignment="Right"  Height="25" Width="100"   Background="AliceBlue"  Content="Close" ToolTip="Close Window (ESC)" IsCancel="True" Margin="5"/>
            </Grid>
        </Border>
    </Grid>
</Window>
